package com.ruoyi.system.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableCategoriesMapper;
import com.ruoyi.system.domain.TableCategories;
import com.ruoyi.system.service.ITableCategoriesService;

/**
 * 桌台分类Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class TableCategoriesServiceImpl extends ServiceImpl<TableCategoriesMapper,TableCategories> implements ITableCategoriesService
{
    @Autowired
    private TableCategoriesMapper tableCategoriesMapper;

    /**
     * 查询桌台分类
     *
     * @param id 桌台分类主键
     * @return 桌台分类
     */
    @Override
    public TableCategories selectTableCategoriesById(Long id)
    {
        return tableCategoriesMapper.selectTableCategoriesById(id);
    }

    /**
     * 查询桌台分类列表
     *
     * @param tableCategories 桌台分类
     * @return 桌台分类
     */
    @Override
    public List<TableCategories> selectTableCategoriesList(TableCategories tableCategories)
    {
        return tableCategoriesMapper.selectTableCategoriesList(tableCategories);
    }

    /**
     * 新增桌台分类
     *
     * @param tableCategories 桌台分类
     * @return 结果
     */
    @Override
    public int insertTableCategories(TableCategories tableCategories)
    {
        return tableCategoriesMapper.insertTableCategories(tableCategories);
    }

    /**
     * 修改桌台分类
     *
     * @param tableCategories 桌台分类
     * @return 结果
     */
    @Override
    public int updateTableCategories(TableCategories tableCategories)
    {
        return tableCategoriesMapper.updateTableCategories(tableCategories);
    }

    /**
     * 通过id批量删除桌台分类信息
     *
     * @param ids 需要删除的桌台分类主键
     * @return 结果
     */
    @Override
    public int deleteTableCategoriesByIds(Long[] ids)
    {
        return tableCategoriesMapper.deleteTableCategoriesByIds(ids);
    }

    /**
     * 通过id删除桌台分类信息
     *
     * @param id 桌台分类主键
     * @return 结果
     */
    @Override
    public int deleteTableCategoriesById(Long id)
    {
        return tableCategoriesMapper.deleteTableCategoriesById(id);
    }
}
